﻿using System.Xml.Linq;
using System.Collections.Generic;
using System;
using HigLabo.Net.Extensions;


namespace HigLabo.Net.Twitter
{
    /// <summary>
    /// 
    /// </summary>
    public class Relationship : ResponseObject
    {
        private FriendSource _Source = null;
        private FriendTarget _Target = null;
        /// <summary>
        /// 
        /// </summary>
        public FriendSource Source
        {
            get { return _Source; }
        }
        /// <summary>
        /// 
        /// </summary>
        public FriendTarget Target
        {
            get { return _Target; }
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="jsonText"></param>
        public Relationship(String jsonText)
        {
            this.SetProperty(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="jsonText"></param>
        public override void SetProperty(String jsonText)
        {
            var d = this.SetData(jsonText);
            d = this.SetData(d.ToString("relationship"));
            this._Target = new FriendTarget(d.ToString("target"));
            this._Source = new FriendSource(d.ToString("source"));
        }
    }
}
